package yfdc;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public final class Defapp extends android.app.Application {
	private static final Boolean LOCK = Boolean.TRUE;
	private static final String TAG = "APP";
	public Defapp() {
		super();
		android.util.Log.d(TAG, "loading application constructor " + this);
	}
	@Contract(pure = true) @NotNull public String toString(){
		return ("YFDC_Default_Application::" + super.toString());
	}
	@Nullable public static Class<?> getClass(@NotNull final String classname) {
		Class<?> cls;
		final String str2 = (String) java.util.Objects.<String>requireNonNull(classname);
		try {
			cls = Class.forName(str2);
		} catch (Throwable ex) {
			cls = null;
		}
		return cls;
	}
	@Override public void onCreate() {
		super.onCreate();
		android.util.Log.d(TAG,"App onCreate");
	}
	@Override public void onTerminate() {
		super.onTerminate();
		android.util.Log.d(TAG,"App onTerminate");
	}
	@Override public void onLowMemory() {
		super.onLowMemory();
		android.util.Log.d(TAG,"App low memory");
	}
	public synchronized static void logException(@Nullable final Throwable exception, @Nullable final String log_tag) {
		if (exception == null) return;
		if (log_tag == null) return;
		synchronized (yfdc.Defapp.LOCK) {
			final java.io.StringWriter var1 = new java.io.StringWriter(100);
			final java.io.PrintWriter var2 = new java.io.PrintWriter(var1, yfdc.Defapp.LOCK);
			exception.printStackTrace(var2);
			final String[] var3 = ((var1.toString()).split("[\r\n]{1,2}"));
			try {
				var1.close();
				var2.close();
				var1.flush();
				var2.flush();
			} catch (Throwable var100) {
				var100.printStackTrace(System.out);
			}
			for (final String var4 : var3) {
				android.util.Log.d(log_tag, var4);
			}
		}
	}
}
